/**
  ETFRoot project, Anyang Normal University && IMP-CAS
  \class ETFTaTracker
  \brief for tracking around the reaction target
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2021-11-09
  \date 2022-04-27 last modified
  \attention
  changelog
  <table>
  <tr>  <th>Date         <th>Author      <th>Description                   </tr>
  <tr>  <td>2021-11-09   <td>Asia Sun    <td>file created                  </tr>
  </table>

  \copyright Copyright (c) 2021 Anyang Normal U. && IMP-CAS with LGPLv3 LICENSE
*/

#ifndef ETFTaTracker_h
#define ETFTaTracker_h

#include "ETFTracker.h"

class ETFTimer;

class ETFTaTracker : public ETFTracker{
public:
  ETFTaTracker(const char *name = "");
  virtual ~ETFTaTracker();

  using ETFTracker::Map;
  virtual void Map3D(); ///< 3D tracking
  virtual void Map(); ///< X tracking
  virtual void TrackMerge(); ///< merge 2D tracks to 3D ones

  /// provide drift time start
  virtual double GetTime() const;
  virtual int GetTimerFiredStatus() const;
  ETFTimer *GetTimer() const{ return fTimer; }

  ClassDef(ETFTaTracker, 1);

protected:
  /// called by Map, to test if a hit combination is eligible
  virtual bool TestCombination(TrackType type); ///< \param type: track type
  using ETFTracker::UpdateHitPos;
  virtual void UpdateHitPos(); ///< update the hit position of the tracks in the tracker

  ETFTimer *fTimer; ///< a plastic scintillator, providing drift time start
  double fTargetZ; ///< as the name indicates
};

#endif
